#include<bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const int N=2e5+10;
#define INF 0x3f3f3f3f;
typedef long long int ll;
#define close(); std::ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);
//----------------------------------------------------------------------------//



int main()
{
	close();
	int a[]={0,1,2,3,4,5,5,5,5,5,6,7,8,9};
	int l=1,r=13;
	while(l<r)
	{
		int mid=l+r>>1;
		if(a[mid]>=5) r=mid;
		else l=mid+1;
	}
	cout<<l<<'\n';

	l=1,r=13;
	while(l<r)
	{
		int mid=l+r+1>>1;
		if(a[mid]<=5) l=mid;
		else r=mid-1;
	}
	cout<<l<<'\n';
	return 0;
}